package org.neusoft.controller;

import org.neusoft.entity.Tags;
import org.neusoft.mapper.TagMapper;
import org.neusoft.rsp.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @AUTHOR 尹书岿
 * @DATE 2024/12/16 16:14
 * @DESCRIBE
 */
@RestController
public class TagController {
    @Autowired
    TagMapper tagMapper;

    @GetMapping("/api/tags")
    ApiResponse<List<Tags>> getAllTags(){
        System.out.println("getAllTags login...");
        List<Tags> tags = tagMapper.getAllTags();
        System.out.println("getAllTags end...");
        return ApiResponse.success(tags);
    }
}
